<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: NicEntryDirect Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00162.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">NicEntryDirect Class Reference<div class="ingroups"><a class="el" href="a00517.html">connectionManager - channel and connection related classes</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="NicEntryDirect" --><!-- doxytag: inherits="NicEntry" -->
<p><a class="el" href="a00159.html" title="NicEntry is used by ConnectionManager to store the necessary information for each nic...">NicEntry</a> is used by <a class="el" href="a00052.html" title="BaseConnectionManager implementation which only defines a specific max interference distance...">ConnectionManager</a> to store the necessary information for each nic.  
 <a href="a00162.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00254_source.html">NicEntryDirect.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for NicEntryDirect:</div>
<div class="dyncontent">
<div class="center"><img src="a00912.png" border="0" usemap="#NicEntryDirect_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for NicEntryDirect:</div>
<div class="dyncontent">
<div class="center"><img src="a00913.png" border="0" usemap="#NicEntryDirect_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00914.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a264c9a96612b45f99eb5a1de1dd2b7fb"></a><!-- doxytag: member="NicEntryDirect::NicEntryDirect" ref="a264c9a96612b45f99eb5a1de1dd2b7fb" args="(bool debug)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a264c9a96612b45f99eb5a1de1dd2b7fb">NicEntryDirect</a> (bool debug)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, initializes all members. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21eb6f7a68d1dc62b30934651b569ba6"></a><!-- doxytag: member="NicEntryDirect::~NicEntryDirect" ref="a21eb6f7a68d1dc62b30934651b569ba6" args="()" -->
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a21eb6f7a68d1dc62b30934651b569ba6">~NicEntryDirect</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor -- needs to be there... <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a56d5f3eb121f931265299294660d70e9">connectTo</a> (<a class="el" href="a00159.html">NicEntry</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect two nics.  <a href="#a56d5f3eb121f931265299294660d70e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00162.html#a4629b3bf3dc1836590016164bd245149">disconnectFrom</a> (<a class="el" href="a00159.html">NicEntry</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect two nics.  <a href="#a4629b3bf3dc1836590016164bd245149"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="a00159.html" title="NicEntry is used by ConnectionManager to store the necessary information for each nic...">NicEntry</a> is used by <a class="el" href="a00052.html" title="BaseConnectionManager implementation which only defines a specific max interference distance...">ConnectionManager</a> to store the necessary information for each nic. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Daniel Willkomm </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00052.html" title="BaseConnectionManager implementation which only defines a specific max interference distance...">ConnectionManager</a>, <a class="el" href="a00159.html" title="NicEntry is used by ConnectionManager to store the necessary information for each nic...">NicEntry</a> </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a56d5f3eb121f931265299294660d70e9"></a><!-- doxytag: member="NicEntryDirect::connectTo" ref="a56d5f3eb121f931265299294660d70e9" args="(NicEntry *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NicEntryDirect::connectTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00159.html">NicEntry</a> *&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connect two nics. </p>
<p>Establish unidirectional connection with other nic</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>reference to remote nic (other <a class="el" href="a00159.html" title="NicEntry is used by ConnectionManager to store the necessary information for each nic...">NicEntry</a>)</td></tr>
  </table>
  </dd>
</dl>
<p>This function acquires an in gate at the remote nic and an out gate at this nic, connects the two and updates the freeInGate, freeOutGate and outConns data sets. </p>

<p>Implements <a class="el" href="a00159.html#a32a71bf1823d8ca0d51fd1cbb67072fe">NicEntry</a>.</p>

<p>References <a class="el" href="a00159.html#a35ef2f3ace25220bf226c52b444d1109">NicEntry::nicId</a>, <a class="el" href="a00159.html#af7819e950101d5062b713eb4c182e34f">NicEntry::nicPtr</a>, and <a class="el" href="a00159.html#a66b957327e66c042028f7b38e4bd0b46">NicEntry::outConns</a>.</p>
<div class="fragment"><pre class="fragment">{
    cModule* otherPtr = other-&gt;<a class="code" href="a00159.html#af7819e950101d5062b713eb4c182e34f" title="Pointer to the NIC module.">nicPtr</a>;

    nicEV &lt;&lt; <span class="stringliteral">&quot;connecting nic #&quot;</span> &lt;&lt; <a class="code" href="a00159.html#a35ef2f3ace25220bf226c52b444d1109" title="module id of the nic for which information is stored">nicId</a> &lt;&lt; <span class="stringliteral">&quot; and #&quot;</span> &lt;&lt; other-&gt;<a class="code" href="a00159.html#a35ef2f3ace25220bf226c52b444d1109" title="module id of the nic for which information is stored">nicId</a> &lt;&lt; endl;

    cGate *radioGate = NULL;
    <span class="keywordflow">if</span> ((radioGate = otherPtr-&gt;gate(<span class="stringliteral">&quot;radioIn&quot;</span>)) == NULL)
        <span class="keywordflow">throw</span> cRuntimeError(<span class="stringliteral">&quot;Nic has no radioIn gate!&quot;</span>);

    <a class="code" href="a00159.html#a66b957327e66c042028f7b38e4bd0b46" title="Outgoing connections of this nic.">outConns</a>[other] = radioGate-&gt;getPathStartGate();
}
</pre></div>
</div>
</div>
<a class="anchor" id="a4629b3bf3dc1836590016164bd245149"></a><!-- doxytag: member="NicEntryDirect::disconnectFrom" ref="a4629b3bf3dc1836590016164bd245149" args="(NicEntry *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NicEntryDirect::disconnectFrom </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00159.html">NicEntry</a> *&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Disconnect two nics. </p>
<p>Release unidirectional connection with other nic</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>reference to remote nic (other <a class="el" href="a00159.html" title="NicEntry is used by ConnectionManager to store the necessary information for each nic...">NicEntry</a>) </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="a00159.html#a0cce4edbe3eb6036ded986482de3de48">NicEntry</a>.</p>

<p>References <a class="el" href="a00159.html#a35ef2f3ace25220bf226c52b444d1109">NicEntry::nicId</a>, and <a class="el" href="a00159.html#a66b957327e66c042028f7b38e4bd0b46">NicEntry::outConns</a>.</p>

<p>Referenced by <a class="el" href="a00162.html#a21eb6f7a68d1dc62b30934651b569ba6">~NicEntryDirect()</a>.</p>
<div class="fragment"><pre class="fragment">{
    nicEV &lt;&lt; <span class="stringliteral">&quot;disconnecting nic #&quot;</span> &lt;&lt; <a class="code" href="a00159.html#a35ef2f3ace25220bf226c52b444d1109" title="module id of the nic for which information is stored">nicId</a> &lt;&lt; <span class="stringliteral">&quot; and #&quot;</span> &lt;&lt; other-&gt;<a class="code" href="a00159.html#a35ef2f3ace25220bf226c52b444d1109" title="module id of the nic for which information is stored">nicId</a> &lt;&lt; endl;
    <a class="code" href="a00159.html#a66b957327e66c042028f7b38e4bd0b46" title="Outgoing connections of this nic.">outConns</a>.erase(other);
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/connectionManager/<a class="el" href="a00254_source.html">NicEntryDirect.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/connectionManager/NicEntryDirect.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00162.html">NicEntryDirect</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
